<script setup>
import { ref ,computed} from 'vue';
import {getAssociationNumber} from '#/api/largeVisualScreen/smallProgram';


getAssociationNumber().then((res)=>{
  console.log("协会数量表",res);
});
const config = computed(() => {

  return {
    data: [
      { name: '北京分行', value: 120 },
      { name: '上海分行', value: 110 },
      { name: '广州分行', value: 95 },
      { name: '深圳分行', value: 90 },
      { name: '成都分行', value: 88 },
      { name: '武汉分行', value: 85 },
      { name: '南京分行', value: 82 },
      { name: '杭州分行', value: 80 },
      { name: '重庆分行', value: 78 },
      { name: '西安分行', value: 75 },
      { name: '长沙分行', value: 72 },
      { name: '青岛分行', value: 70 },
      { name: '天津分行', value: 68 },
      { name: '沈阳分行', value: 65 },
      { name: '大连分行', value: 62 },
      { name: '厦门分行', value: 60 },
      { name: '济南分行', value: 58 },
      { name: '郑州分行', value: 55 },
      { name: '福州分行', value: 52 },
      { name: '合肥分行', value: 50 },
      { name: '南昌分行', value: 48 },
      { name: '太原分行', value: 45 },
      { name: '昆明分行', value: 42 },
      { name: '兰州分行', value: 40 },
      { name: '贵阳分行', value: 38 },
      { name: '南宁分行', value: 35 }
    ],
    carousel: 'single',
    waitTime: 2000,
    sort: true,
    valueFormatter: ({ value }) => value.toLocaleString(),
  };
})

</script>

<template>
  <dv-border-box-12 class="left-container">
    <div class="title">协会数量</div>
    <dv-scroll-ranking-board :config="config" style="height: calc(100% - 50px)" />
  </dv-border-box-12>
</template>

<style scoped>
.left-container {
  width: 100%;
  border-radius: 4px;
  padding: 5px 20px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.title {
  color: #fff;
  font-size: 16px;
  margin: 5px 0;
  text-align: center;
}

.content-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 10px;
}

.total-count {
  color: #fff;
  font-size: 20px;
  font-weight: bold;
  text-align: center;
  margin-bottom: 15px;
}

.tab-container {
  display: flex;
  justify-content: center;
  margin-bottom: 15px;
  flex-wrap: wrap;
  gap: 8px;
}

.tab-item {
  padding: 5px 12px;
  color: #fff;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 4px;
  transition: all 0.3s;
}

.tab-item:hover {
  background: rgba(0, 186, 255, 0.2);
}

.tab-item.active {
  background: #00baff;
  border-color: #00baff;
}

.data-list {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  overflow-y: auto;
}

.data-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

.data-item .name {
  color: #fff;
  font-size: 14px;
}

.data-item .value {
  color: #00baff;
  font-weight: bold;
}
</style>
